<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>LOGIN</title>
    <meta name="description" content="particles.js is a lightweight JavaScript library for creating particles.">
    <meta name="author" content="Vincent Garreau"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" media="screen" href="../static/css/login.css">
</head>
<body>
<!-- particles.js container -->
<div id="particles-js" style="display: flex;align-items: center;justify-content: center">
</div>
<div class="login-page">
    <div class="login-content">
        <div class="login-tit">LOGIN</div>
        <form action="/user/login" method="post" id="login-form">
            <div class="login-input">
                <label>
                    <input type="text" placeholder="account" name="account">
                </label>
            </div>
            <div class="login-input">
                <label>
                    <input type="password" placeholder="password" name="password">
                </label>
            </div>
            <div class="login-btn">
                <div class="login-btn-left">
                    <span onclick="submit()">LOGIN</span>
                </div>
                <div class="login-btn-right" onclick="changeImg()">
                    <img src="../static/img/check.png" alt="" id="picture"> Remember the password
                </div>
            </div>
        </form>
    </div>
</div>


<!-- scripts -->
<script src="../static/js/particles.js"></script>
<script src="../static/js/app.js"></script>
<script>
    function changeImg() {
        let pic = document.getElementById('picture');
        console.log(pic.src)
        if (pic.getAttribute("src") === "../static/img/check.png") {
            pic.src = "../static/img/checked.png"
        } else {
            pic.src = "../static/img/check.png"
        }
    }

    function submit() {
        let form = document.getElementById("login-form");
        form.submit();
    }
</script>
</body>
</html>
